<?php

//Business_Latitude_new,Business_Longitude_new是当前坐标
//$latitude,$longitude是目标坐标
$distance = 6371.012 *
    acos(cos(acos(-1) / 180 * Business_Latitude_new) *
        cos(acos(-1) / 180 * $latitude) *
        cos(acos(-1) / 180 * Business_Longitude_new - acos(-1) / 180 * $longitude) +
        sin(acos(-1) / 180 * Business_Latitude_new) *
        sin(acos(-1) / 180 * $latitude))*1;